<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BabyOS: b_suart.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="2.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BabyOS
   &#160;<span id="projectnumber">V1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b9223522bb56aee4ab59f7ba381d2163.html">bos</a></li><li class="navelem"><a class="el" href="dir_bd0e78931a998067c69a2f2b1c188ef6.html">drivers</a></li><li class="navelem"><a class="el" href="dir_a2fcf4aae5087025318b36ee58bb1815.html">inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">b_suart.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="b__suart_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifndef __B_SUART_H__</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define __B_SUART_H__</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; <span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">/*Includes ----------------------------------------------*/</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="b__config_8h.html">b_config.h</a>&quot;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="b__device_8h.html">b_device.h</a>&quot;</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___types_definitions.html#ga76678b78633641a143ec958271e0bc05">   56</a></span>&#160;<span class="keyword">typedef</span> <a class="code" href="structb_driver_interface__t.html">bDriverInterface_t</a>   <a class="code" href="group___s_u_a_r_t___exported___types_definitions.html#ga76678b78633641a143ec958271e0bc05">SUART_Driver_t</a>;  </div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160; </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="struct_s___r_x_info__t.html">   58</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;{</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="struct_s___r_x_info__t.html#a62e96a9ecdde0ab8494d1dae9762f595">   60</a></span>&#160;    <span class="keyword">volatile</span> uint8_t <a class="code" href="struct_s___r_x_info__t.html#a62e96a9ecdde0ab8494d1dae9762f595">byte</a>;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="struct_s___r_x_info__t.html#afea475b453c81c5b3f5a31abb861edfb">   61</a></span>&#160;    <span class="keyword">volatile</span> uint8_t <a class="code" href="struct_s___r_x_info__t.html#afea475b453c81c5b3f5a31abb861edfb">status</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="struct_s___r_x_info__t.html#a533890957460cf4f360cf222426df810">   62</a></span>&#160;    <span class="keyword">volatile</span> uint8_t <a class="code" href="struct_s___r_x_info__t.html#a533890957460cf4f360cf222426df810">c_bits</a>;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="struct_s___r_x_info__t.html#aa2665ebcc94066966583ee7c2c754862">   63</a></span>&#160;    uint8_t buf[128];</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="struct_s___r_x_info__t.html#aef4c4f3630ede69cba8c75369a5459af">   64</a></span>&#160;    <span class="keyword">volatile</span> uint8_t <a class="code" href="struct_s___r_x_info__t.html#aef4c4f3630ede69cba8c75369a5459af">count</a>;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="struct_s___r_x_info__t.html#a34ed48d0499d28be718165306a573aeb">   65</a></span>&#160;    <span class="keyword">volatile</span> uint8_t <a class="code" href="struct_s___r_x_info__t.html#a34ed48d0499d28be718165306a573aeb">revf</a>;</div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="struct_s___r_x_info__t.html#a2fca36c37bbd385665d8d422df068370">   66</a></span>&#160;    <span class="keyword">volatile</span> uint8_t <a class="code" href="struct_s___r_x_info__t.html#a2fca36c37bbd385665d8d422df068370">idle_count</a>;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="struct_s___r_x_info__t.html#a02fecce62db76d446cceec8d87e330f9">   67</a></span>&#160;    <span class="keyword">volatile</span> uint8_t <a class="code" href="struct_s___r_x_info__t.html#a02fecce62db76d446cceec8d87e330f9">idle_flag</a>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;}<a class="code" href="struct_s___r_x_info__t.html">S_RXInfo_t</a>;   </div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#gaea373353179cdbcc8a9b1293edbd4932">   78</a></span>&#160;<span class="preprocessor">#define S_TX_S_NULL             0</span></div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#ga57dce3ade77c94e32d99ba1f164a6a3a">   79</a></span>&#160;<span class="preprocessor">#define S_TX_S_REQ              1</span></div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#ga84fe92c64968058d383184fc5367cb74">   80</a></span>&#160;<span class="preprocessor">#define S_TX_S_ING              2</span></div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#gae3f8830c218398d8567e3b53c8b09e6e">   81</a></span>&#160;<span class="preprocessor">#define S_TX_S_STOP             3</span></div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#ga42963e98a09cb8072a06f39b32f79a4d">   82</a></span>&#160;<span class="preprocessor">#define S_TX_S_WAIT             4</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#ga7b0fd6f9d6d235df0a71ae2e1a1277b6">   85</a></span>&#160;<span class="preprocessor">#define S_RX_S_NULL             0</span></div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#gaa319b4bfa61f71bb997013eb2de3eee4">   86</a></span>&#160;<span class="preprocessor">#define S_RX_S_START            1</span></div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#ga23061086cd3c27746726d9a21801339a">   87</a></span>&#160;<span class="preprocessor">#define S_RX_S_ING              2</span></div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#ga4bababb18ccb91dfab9c8cfb4ec1e44b">   88</a></span>&#160;<span class="preprocessor">#define S_RX_S_STOP             3</span></div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#ga3a9d6e867fa3589654b1c4f1a315cccc">   89</a></span>&#160;<span class="preprocessor">#define S_RX_S_WAIT             4</span></div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#ga2db399723e5461caf044ee118e824203">   90</a></span>&#160;<span class="preprocessor">#define S_RX_S_IDLE             5</span></div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="preprocessor">#ifndef NULL</span></div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="group___s_u_a_r_t___exported___defines.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">   94</a></span>&#160;<span class="preprocessor">#define NULL ((void *)0)   </span></div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">extern</span> <a class="code" href="structb_driver_interface__t.html">SUART_Driver_t</a> <a class="code" href="group___s_u_a_r_t___exported___variables.html#ga2653dcd74de96e06405a5207f6f53f3e">SUART_Driver</a>;   </div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___s_u_a_r_t___exported___functions.html#gaf0674055c3083cfcf4e20633f1deabb2">S_UartTxTimerHandler</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___s_u_a_r_t___exported___functions.html#ga2de0a2047cfba22db54132164576cc18">S_UartRXStart</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___s_u_a_r_t___exported___functions.html#gab302ede121d8fa7a6452427523b1ffeb">S_UartRxTimerHandler</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___s_u_a_r_t___exported___functions.html#ga4905cf58b8ed4c083969f3f9131e38ff">SUART_Init</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    }</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160; </div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="comment">/************************ Copyright (c) 2019 Bean *****END OF FILE****/</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="ttc" id="struct_s___r_x_info__t_html_a62e96a9ecdde0ab8494d1dae9762f595"><div class="ttname"><a href="struct_s___r_x_info__t.html#a62e96a9ecdde0ab8494d1dae9762f595">S_RXInfo_t::byte</a></div><div class="ttdeci">volatile uint8_t byte</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8h_source.html#l00060">b_suart.h:60</a></div></div>
<div class="ttc" id="group___s_u_a_r_t___exported___types_definitions_html_ga76678b78633641a143ec958271e0bc05"><div class="ttname"><a href="group___s_u_a_r_t___exported___types_definitions.html#ga76678b78633641a143ec958271e0bc05">SUART_Driver_t</a></div><div class="ttdeci">bDriverInterface_t SUART_Driver_t</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8h_source.html#l00056">b_suart.h:56</a></div></div>
<div class="ttc" id="group___s_u_a_r_t___exported___functions_html_gab302ede121d8fa7a6452427523b1ffeb"><div class="ttname"><a href="group___s_u_a_r_t___exported___functions.html#gab302ede121d8fa7a6452427523b1ffeb">S_UartRxTimerHandler</a></div><div class="ttdeci">void S_UartRxTimerHandler(void)</div><div class="ttdoc">RX Timer handler. </div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8c_source.html#l00224">b_suart.c:224</a></div></div>
<div class="ttc" id="struct_s___r_x_info__t_html_aef4c4f3630ede69cba8c75369a5459af"><div class="ttname"><a href="struct_s___r_x_info__t.html#aef4c4f3630ede69cba8c75369a5459af">S_RXInfo_t::count</a></div><div class="ttdeci">volatile uint8_t count</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8h_source.html#l00064">b_suart.h:64</a></div></div>
<div class="ttc" id="structb_driver_interface__t_html"><div class="ttname"><a href="structb_driver_interface__t.html">bDriverInterface_t</a></div><div class="ttdef"><b>Definition:</b> <a href="b__device_8h_source.html#l00073">b_device.h:73</a></div></div>
<div class="ttc" id="struct_s___r_x_info__t_html_a533890957460cf4f360cf222426df810"><div class="ttname"><a href="struct_s___r_x_info__t.html#a533890957460cf4f360cf222426df810">S_RXInfo_t::c_bits</a></div><div class="ttdeci">volatile uint8_t c_bits</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8h_source.html#l00062">b_suart.h:62</a></div></div>
<div class="ttc" id="struct_s___r_x_info__t_html_a34ed48d0499d28be718165306a573aeb"><div class="ttname"><a href="struct_s___r_x_info__t.html#a34ed48d0499d28be718165306a573aeb">S_RXInfo_t::revf</a></div><div class="ttdeci">volatile uint8_t revf</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8h_source.html#l00065">b_suart.h:65</a></div></div>
<div class="ttc" id="group___s_u_a_r_t___exported___variables_html_ga2653dcd74de96e06405a5207f6f53f3e"><div class="ttname"><a href="group___s_u_a_r_t___exported___variables.html#ga2653dcd74de96e06405a5207f6f53f3e">SUART_Driver</a></div><div class="ttdeci">SUART_Driver_t SUART_Driver</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8c_source.html#l00078">b_suart.c:78</a></div></div>
<div class="ttc" id="struct_s___r_x_info__t_html_afea475b453c81c5b3f5a31abb861edfb"><div class="ttname"><a href="struct_s___r_x_info__t.html#afea475b453c81c5b3f5a31abb861edfb">S_RXInfo_t::status</a></div><div class="ttdeci">volatile uint8_t status</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8h_source.html#l00061">b_suart.h:61</a></div></div>
<div class="ttc" id="struct_s___r_x_info__t_html_a02fecce62db76d446cceec8d87e330f9"><div class="ttname"><a href="struct_s___r_x_info__t.html#a02fecce62db76d446cceec8d87e330f9">S_RXInfo_t::idle_flag</a></div><div class="ttdeci">volatile uint8_t idle_flag</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8h_source.html#l00067">b_suart.h:67</a></div></div>
<div class="ttc" id="group___s_u_a_r_t___exported___functions_html_gaf0674055c3083cfcf4e20633f1deabb2"><div class="ttname"><a href="group___s_u_a_r_t___exported___functions.html#gaf0674055c3083cfcf4e20633f1deabb2">S_UartTxTimerHandler</a></div><div class="ttdeci">void S_UartTxTimerHandler(void)</div><div class="ttdoc">TX Timer handler. </div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8c_source.html#l00201">b_suart.c:201</a></div></div>
<div class="ttc" id="group___s_u_a_r_t___exported___functions_html_ga2de0a2047cfba22db54132164576cc18"><div class="ttname"><a href="group___s_u_a_r_t___exported___functions.html#ga2de0a2047cfba22db54132164576cc18">S_UartRXStart</a></div><div class="ttdeci">void S_UartRXStart(void)</div><div class="ttdoc">RX Start. </div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8c_source.html#l00209">b_suart.c:209</a></div></div>
<div class="ttc" id="b__config_8h_html"><div class="ttname"><a href="b__config_8h.html">b_config.h</a></div></div>
<div class="ttc" id="b__device_8h_html"><div class="ttname"><a href="b__device_8h.html">b_device.h</a></div></div>
<div class="ttc" id="group___s_u_a_r_t___exported___functions_html_ga4905cf58b8ed4c083969f3f9131e38ff"><div class="ttname"><a href="group___s_u_a_r_t___exported___functions.html#ga4905cf58b8ed4c083969f3f9131e38ff">SUART_Init</a></div><div class="ttdeci">int SUART_Init(void)</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8c_source.html#l00267">b_suart.c:267</a></div></div>
<div class="ttc" id="struct_s___r_x_info__t_html_a2fca36c37bbd385665d8d422df068370"><div class="ttname"><a href="struct_s___r_x_info__t.html#a2fca36c37bbd385665d8d422df068370">S_RXInfo_t::idle_count</a></div><div class="ttdeci">volatile uint8_t idle_count</div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8h_source.html#l00066">b_suart.h:66</a></div></div>
<div class="ttc" id="struct_s___r_x_info__t_html"><div class="ttname"><a href="struct_s___r_x_info__t.html">S_RXInfo_t</a></div><div class="ttdef"><b>Definition:</b> <a href="b__suart_8h_source.html#l00058">b_suart.h:58</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
